package service.impl;

import dao.PowerbatteryDao;
import dao.impl.powerbatteryDaoImpl;
import entity.Powerbattery;
import service.PowerbatteryService;

import java.util.List;

public class PowerbatteryServletImpl implements PowerbatteryService {
    PowerbatteryDao powerbatteryDao = new powerbatteryDaoImpl();
    @Override
    public List<Powerbattery> powSelect() {
        return powerbatteryDao.selectAll();
    }

    @Override
    public Powerbattery selectThis(int id) {
        return powerbatteryDao.selectThis(id);
    }

    @Override
    public boolean selectUpdate(Powerbattery powerbattery) {
        return powerbatteryDao.selectUpdate(powerbattery) > 0;
    }

    @Override
    public boolean delete(int id) {
        return powerbatteryDao.delete(id) > 0;
    }
}
